<template>
    <div>
        <flexbox
            align="flex-start"
            style="height: 100%; position: relative; background: #fff"
            v-if="lubiaoDetail && lubiaoDetail.pmpProductDetailDTO && lubiaoDetail.pmpProductDetailDTO.isOutsideSystem == 0"
        >
            <div style="width: 50%; background: #fff">
                <LeftSide v-bind="$attrs" :lubiaoDetail="lubiaoDetail" :disabled="disabled" @success="handleSuccess" />
            </div>
            <div style="position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; height: 100%; background: #f0f2f5" />
            <div style="width: calc(50% - 2px); background: #fff">
                <RightSide v-bind="$attrs" :lubiaoDetail="lubiaoDetail" :disabled="disabled" @success="handleSuccess" />
            </div>
        </flexbox>

        <flexbox
            align="flex-start"
            style="height: 100%; position: relative; background: #fff"
            v-if="lubiaoDetail && lubiaoDetail.pmpProductDetailDTO && lubiaoDetail.pmpProductDetailDTO.isOutsideSystem == 1"
        >
            <div style="width: 100%; background: #fff">
                <JiraVersion v-bind="$attrs" :lubiaoDetail="lubiaoDetail" :disabled="disabled" @success="handleSuccess" />
            </div>
        </flexbox>
    </div>
</template>

<script lang="ts">
import LeftSide from './LeftSide/index.vue';
import RightSide from './RightSide/index.vue';
import JiraVersion from './JiraVersion/index.vue';
import { defineComponent } from 'vue';
export default defineComponent({
    components: {
        LeftSide,
        RightSide,
        JiraVersion
    },
    props: {
        disabled: {
            type: Boolean,
            default: false
        },
        lubiaoDetail: {
            type: Object,
            default: () => ({})
        }
    },
    emits: ['success'],
    setup(_, { emit }) {
        const handleSuccess = () => {
            emit('success');
        };
        return {
            handleSuccess
        };
    }
});
</script>

<style scoped>
</style>